package weather_service.weatherprovider.weatherdatamodel;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * Weather information returned by all calls to the weather.com XML Data Feed.
 * <p/>
 */
public class WeatherReport {

  private String type;
  private Header header;
  private Location location;
  private CurrentConditions currentConditions;
  private Forecast forecast;

  /**
   * Default constructor, for bean cloning purposes only.
   */
  public WeatherReport() {
  }

  /**
   * WeatherChannel Constructor. All properties, except the type, are set to <b>null</b>.
   * <p/>
   *
   * @param type the type of the feed.
   */
  public WeatherReport(String type) {
    this.type = type;
  }

  public Header getHeader() {
    return header;
  }

  public void setHeader(Header header) {
    this.header = header;
  }

  public Location getLocation() {
    return location;
  }

  public void setLocation(Location location) {
    this.location = location;
  }

  public CurrentConditions getCurrentConditions() {
    return currentConditions;
  }

  public void setCurrentConditions(CurrentConditions currentConditions) {
    this.currentConditions = currentConditions;
  }

  public Forecast getForecast() {
    return forecast;
  }

  public void setForecast(Forecast forecast) {
    this.forecast = forecast;
  }

  public String toString() {
    return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
  }
}

